<?php
namespace Emoney\EpayBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Emoney\EpayBundle\Form\Type\ContactType;
use Symfony\Component\HttpFoundation\Request;
/**
 * Description of ContactController
 *
 * @author FFOZEU
 */
class ContactController extends Controller{
    
    function contactAction(Request $request) {
        
        $form = $this->createForm(new ContactType());
        
        if ($request->getMethod() == 'POST') {
            $form->bindRequest($request);

            if ($form->isValid()) {
                // perform some action, such as saving the task to the database

                return $this->redirect($this->generateUrl('EmoneyEpayBundle_homepage'));
            }
        }else{
            return $this->render('EmoneyEpayBundle:contact:contact.html.twig', array(
                'form' => $form->createView(),
            ));
        }
    }
    
}

?>
